package com.yf.service.article.impl;

import com.yf.service.article.CampaignService;
import com.yf.service.impl.BaseServiceImpl;
import com.yf.vo.CampaignBackVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.yf.dao.article.CampaignDao;
import com.yf.entity.CampaignEntity;

/**
 * 活动Service实现类
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Wed Aug 22 14:30:08 CST 2018
 */
@Service
public class CampaignServiceImpl extends BaseServiceImpl<CampaignEntity> implements CampaignService {
    @Autowired
    private CampaignDao campaignDao;



    /**内部方法**/


    /**外部方法实现**/

    /**
     *  back 根据活动名称查询当前活动的参与人
     */
    @Override
    public List<CampaignBackVo> campaignList() {
        List<CampaignBackVo> list = campaignDao.campaignList();
        return list;
    }

    /**
     * 查询有效活动
     */
    public List<CampaignEntity> showCampaigns(){

        return campaignDao.getCampaigns();
    }

    /**
     * back 活动参与者信息
     * @return
     */
    @Override
    public List<CampaignBackVo> campaignVoList(Map<String, Object> params) {
        List<CampaignBackVo> list = campaignDao.campaignVoList(params);
        return list;
    }
}
